package zgs;

public class Score {
    public static double ss(double[] a){
        double sum = 0;
        double max=a[0];
        double min=a[0];
        for(int i=0;i<a.length;i++){
            if(max<a[i]){
                max=a[i];
            }
            if(min>a[i]){
                min=a[i];
            }
        }
        for(int i=0;i<a.length;i++){
            sum+=a[i];
        }
        return (sum-max-min)/(a.length-2);
    }
}
